import { Config } from "./config.interface";

const config: Config = {
    // 设置端口，等相关信息
    nestConfig: {
        port: 3100,
        env: "development",
        host: "0.0.0.0"
    },

    // 设置跨域配置
    corsConfig: {   
        enabled: true,
    },

    // 设置swagger doc配置
    swaggerConfig: {
        enabled: true,
        title: "公司官网 API",
        description: "昂科公司官网 API 接口文档",
        version: "3.0",
        path: "/api",
    },

    // 设置过期时间
    securityConfig: {
        expiresIn: "2m",
        refreshIn: "7d",
        bcryptSaltOrRound: 10,
    },

    // 上传文件设置
    uploadConfig: {
        path: "upload",
    },

    logger: {
        level: "debug",
        maxFiles: 10,
    },

    redis: {
        host: '127.0.0.1',
        port: '6379',
        password: '',
        db: 0,
    },
}

export default (): Config => config;